package lottery;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table
public class OpenReward
{
    private int id;
    private int lotteryId;
    private String lotteryName;
    private String numberID; //期号
    private String number;
    private int beginTime;  //开始时间
    private int endTime;  //截止时间(时：分：秒的总秒数)
    private Date endTimeDate; //截止时间日期
    private int openTime; //开奖时间 
    private String yyyyMMdd;  //年月日
    private Date orderTime; //new Date(yyyyMMmm).getTime()+openTime
	private String status; //1 or 0
    
    @Column(length=8)
    public String getYyyyMMdd() {
		return yyyyMMdd;
	}
	public void setYyyyMMdd(String yyyyMMdd) {
		this.yyyyMMdd = yyyyMMdd;
	}
    @Id
    @GeneratedValue
    public int getId()
    {
        return id;
    }
    public void setId(int id)
    {
        this.id = id;
    }
    public int getLotteryId()
    {
        return lotteryId;
    }
    public void setLotteryId(int lotteryId)
    {
        this.lotteryId = lotteryId;
    }
    @Column(length=30)
    public String getLotteryName()
    {
        return lotteryName;
    }
    public void setLotteryName(String lotteryName)
    {
        this.lotteryName = lotteryName;
    }
    @Column(length=20)
    public String getNumber()
    {
        return number;
    }
    public void setNumber(String number)
    {
        this.number = number;
    }
    @Column(length=1)
    public String getStatus()
    {
        return status;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }
    public int getBeginTime()
    {
        return beginTime;
    }
    public void setBeginTime(int beginTime)
    {
        this.beginTime = beginTime;
    }
    public int getEndTime()
    {
        return endTime;
    }
    public void setEndTime(int endTime)
    {
        this.endTime = endTime;
    }
    public int getOpenTime()
    {
        return openTime;
    }
    public void setOpenTime(int openTime)
    {
        this.openTime = openTime;
    }
    @Temporal(TemporalType.TIMESTAMP)
	public Date getOrderTime() {
		return orderTime;
	}
	public void setOrderTime(Date orderTime) {
		this.orderTime = orderTime;
	}
    @Temporal(TemporalType.TIMESTAMP)
    public Date getEndTimeDate()
    {
        return endTimeDate;
    }
    public void setEndTimeDate(Date endTimeDate)
    {
        this.endTimeDate = endTimeDate;
    }
    @Column(length=30)
    public String getNumberID()
    {
        return numberID;
    }
    public void setNumberID(String numberID)
    {
        this.numberID = numberID;
    }
	
}
